home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1993 / MacHack 1993.toast / MacHack™ 1987-1992 / MacHack™ '90 / Other Stuff / Demos ƒ / Demo AppMaker / Demo AppMaker™ / Demo AppMaker™.rsrc / TmpC_109_Dispatcher < prev    next >
Encoding:
Text File  |  1990-03-23  |  2.7 KB  |  151 lines

  1. /* %filename% -- dispatcher for windows and for modeless dialogs */
  2. /* Created %date% %time% by AppMaker */
  3.  
  4. %If lang = MPW%
  5. #include <Types.h>
  6. #include <Quickdraw.h>
  7. #include <Controls.h>
  8. #include <Dialogs.h>
  9. #include <Events.h>
  10. #include <Lists.h>
  11. #include <Menus.h>
  12. #include <TextEdit.h>
  13.  
  14. %end if%
  15. %for each window gen include%
  16. %for each dialog gen includeModeless%
  17.  
  18. #include "Globals.h"
  19.  
  20. #include "%unitname%.h"
  21. %If lang = MPW%
  22.  
  23. #pragma segment %unitname% 
  24. %end if%
  25.  
  26. /*----------*/
  27. void OpenWindows (fName, vRefNum, fRefNum)
  28. Str255            fName;
  29. short            vRefNum;
  30. short            fRefNum;
  31. {
  32.     %for each window gen open%
  33. } /*OpenWindows*/
  34.  
  35. /*----------*/
  36. void CloseCurWindow ()
  37. {
  38.     switch (cur->windowKind) {
  39.     %for each window gen close%
  40.     } /*switch*/
  41. } /*CloseCurWindow*/
  42.  
  43. /*----------*/
  44. void MouseInContent (where, modifiers)
  45. Point            where;
  46. short            modifiers;
  47. {
  48.     switch (cur->windowKind) {
  49.     %for each window gen mousein%
  50.     } /*case*/
  51. } /*MouseInContent*/
  52.  
  53. /*----------*/
  54. void TypeInWindow (ch)
  55. char            ch;
  56. {
  57.     switch (cur->windowKind) {
  58.     %for each window gen typein%
  59.     } /*case*/
  60. } /*TypeInWindow*/
  61.  
  62. /*----------*/
  63. void UpdateContent ()
  64. {
  65.     switch (cur->windowKind) {
  66.     %for each window gen update%
  67.     } /*case*/
  68. } /*UpdateContent*/
  69.  
  70. /*----------*/
  71. void ActivateContent (activate)
  72. Boolean            activate;
  73. {
  74.     switch (cur->windowKind) {
  75.     %for each window gen activate%
  76.     } /*case*/
  77. } /*ActivateContent*/
  78.  
  79. /*----------*/
  80. void ResizeContent ()
  81. {
  82.     switch (cur->windowKind) {
  83.     %for each window gen resize%
  84.     } /*case*/
  85. } /*ResizeContent*/
  86.  
  87. /*----------*/
  88. pascal void ScrollWindow (newValue, oldValue)
  89. short            newValue;
  90. short            oldValue;
  91. {
  92.     switch (cur->windowKind) {
  93.     %for each window gen scroll%
  94.     } /*case*/
  95. } /*ScrollWindow*/
  96.  
  97. /*----------*/
  98. void DoControl (whichControl, whichPart, where)
  99. ControlHandle    whichControl;
  100. short            whichPart;
  101. Point            where;
  102. {
  103.     switch (cur->windowKind) {
  104.     %for each window gen track%
  105.     } /*case*/
  106. } /*DoControl*/
  107.  
  108. /*----------*/
  109. void InitModelessDialogs ()
  110. {
  111.     %for each dialog gen init%
  112. } /*InitModelessDialogs*/
  113.  
  114. /*----------*/
  115. void CloseModelessDialog (whichDialog)
  116. DialogPtr        whichDialog;
  117. {
  118. %if lang = MPW%
  119. #pragma unused (whichDialog) 
  120.   
  121. %end if%
  122.     %for each dialog gen close%
  123. } /*CloseModelessDialog*/
  124.  
  125. /*----------*/
  126. Boolean FilterModeless (whichDialog, event, itemHit)
  127. DialogPtr        whichDialog;
  128. EventRecord        *event;
  129. short            *itemHit;
  130. {
  131. %if lang = MPW%
  132. #pragma unused (whichDialog, event, itemHit) 
  133.   
  134. %end if%
  135.     %for each dialog gen filter%
  136.     return (false);
  137. } /*FilterModeless*/
  138.  
  139. /*----------*/
  140. void DoModelessItem (whichDialog, itemNr)
  141. DialogPtr        whichDialog;
  142. short            itemNr;
  143. {
  144. %if lang = MPW%
  145. #pragma unused (whichDialog, itemNr) 
  146.   
  147. %end if%
  148.     %for each dialog gen handleitem%
  149. } /*DoModelessItem*/
  150.  
  151. /* %unitname% */